Namespace - LJCNetCommon
Parameters
text - The add text.
addIndent - Indicates if the element can be indented.
allowNewLine - Indicates if a new line can be added.
Returns
The potentially indented and wrapped new text value.
Syntax
C# |
public String Line(String text = null, Boolean addIndent = True, Boolean allowNewLine = True)
|
Adds a modified text line to the builder.
Remarks
Line() is an "Append" method. It creates the text with GetText() and adds
a new line after the text. The text is then added to the builder.
Line() works the same as Text() except it appends a new line.
Example
C# |
var tb = new TextBuilder();
tb.Text("This is an appended line.");
tb.AddIndent();
tb.Line();
tb.Text("This is an indented line.");
var result = tb.ToString();
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.